import { Button, Form, Input } from 'antd-mobile'
import React from 'react'
import { useNavigate } from 'react-router-dom'
const Home = () => {
     const navigate=useNavigate()
     const onFinish = (values) => {
     console.log(values);
     navigate('/list',{state:values})
  }
  return (
    <div>
      首页
      <Form 
        onFinish={onFinish}
        footer={
          <Button block type='submit' shape='rounded' color='success' size='large'>
            搜索火车票
          </Button>
        }
      >
        <Form.Item name='start' label='开始'>
          <Input></Input>
        </Form.Item>
         <Form.Item name='end' label='结束'>
          <Input></Input>
        </Form.Item>
      </Form>
    </div>
  )
}

export default Home
